home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QuickTime 1.0 for Developers
/
QuickTime 1.0 for Developers.iso
/
Programming Stuff
/
Interfaces
/
Oldstyle C Interfaces
/
Matrix.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-06
|
3KB
|
95 lines
/*
File: Matrix.h
Copyright: © 1991 by Apple Computer, Inc., all rights reserved.
*/
#ifndef _Matrix_
#define _Matrix_
#include <types.h>
#ifndef kFix1
#define kFix1 (0x00010000)
#endif
#ifndef kFrac1
#define kFrac1 (0x40000000)
#endif
struct MatrixRecord {
Fixed matrix[3][3];
};
typedef struct MatrixRecord MatrixRecord;
typedef MatrixRecord *MatrixRecordPtr;
typedef struct FixedPoint {
Fixed x;
Fixed y;
} FixedPoint;
typedef struct FixedRect {
Fixed left;
Fixed top;
Fixed right;
Fixed bottom;
} FixedRect;
typedef enum {
identityMatrix = 0x00, /* result if matrix is identity */
translateMatrix = 0x01, /* result if matrix translates */
scaleMatrix = 0x02, /* result if matrix scales */
linearMatrix = 0x04, /* result if matrix is general 2 x 2 */
perspectiveMatrix = 0x06 /* result if matrix is general 3 x 3 */
} MatrixFlags;
pascal short GetMatrixType(MatrixRecord *m)
= {0x7014,0xABC2};
pascal void CopyMatrix(MatrixRecord *m1, MatrixRecord *m2)
= {0x7020,0xABC2};
pascal Boolean EqualMatrix(MatrixRecord *m1, MatrixRecord *m2)
= {0x7021,0xABC2};
pascal void SetIdentityMatrix( MatrixRecord *matrix )
= {0x7015,0xABC2};
pascal void TranslateMatrix( MatrixRecord *m, Fixed deltaH, Fixed deltaV )
= {0x7019,0xABC2};
pascal void TranslateMatrixTo( MatrixRecord *m, Fixed deltaH, Fixed deltaV )
= {0x701a,0xABC2};
pascal void RotateMatrix( MatrixRecord *m, Fixed degrees, Fixed aboutX, Fixed aboutY )
= {0x7016,0xABC2};
pascal void ScaleMatrix( MatrixRecord *m, Fixed scaleX, Fixed scaleY, Fixed aboutX, Fixed aboutY )
= {0x7017,0xABC2};
pascal void SkewMatrix(MatrixRecord *m, Fixed skewX, Fixed skewY, Fixed aboutX, Fixed aboutY)
= {0x7018,0xABC2};
pascal OSErr TransformFixedPoints(MatrixRecord *m, FixedPoint *fpt, long count)
= {0x7022,0xABC2};
pascal OSErr TransformPoints( MatrixRecord *mp, Point *pt1, long count )
= {0x7023,0xABC2};
pascal Boolean TransformFixedRect(MatrixRecord *m, FixedRect *fr, FixedPoint *fpp)
= {0x7024,0xABC2};
pascal Boolean TransformRect(MatrixRecord *m, Rect *r, FixedPoint *fpp)
= {0x7025,0xABC2};
pascal Boolean InverseMatrix(MatrixRecord *m, MatrixRecord *im)
= {0x701c,0xABC2};
pascal void ConcatMatrix(MatrixRecord *a, MatrixRecord *b)
= {0x701b,0xABC2};
pascal void RectMatrix(MatrixRecord *matrix,Rect *srcRect,Rect *dstRect)
= {0x701e,0xABC2};
pascal void MapMatrix(MatrixRecord *matrix,Rect *fromRect,Rect *toRect)
= {0x701d,0xABC2};
pascal void AlignMatrix(register MatrixRecord *mrp, Rect *srcRect)
= {0x701f,0xABC2};
#endif _Matrix_